package com.archetypus.projectschedule.web.activities.bd;

import com.archetypus.projectschedule.common.dto.activities.Activity;
import com.archetypus.projectschedule.common.dto.activities.ActivityListHandler;
import com.archetypus.projectschedule.common.dto.projects.Project;
import com.archetypus.projectschedule.common.exceptions.ProjectSchedulerException;
import com.archetypus.projectschedule.core.activities.sf.ActivitySF;

public class ActivityBD implements IActivityBD {

	public void createActivity(Activity activity) throws ProjectSchedulerException {
		ActivitySF.getInstance().createActivity(activity);
	}

	public void deleteActivity(Activity activity) throws ProjectSchedulerException {
		ActivitySF.getInstance().deleteActivity(activity);
	}

	public Activity findActivity(Activity activity) throws ProjectSchedulerException {
		return ActivitySF.getInstance().findActivity(activity);
	}

	public ActivityListHandler listActivities() throws ProjectSchedulerException {
		return ActivitySF.getInstance().listActivities();
	}

	public void updateActivity(Activity activity) throws ProjectSchedulerException {
		ActivitySF.getInstance().updateActivity(activity);
	}

	public ActivityListHandler listActivitiesByProject(Project project)
			throws ProjectSchedulerException {
		// TODO Auto-generated method stub
		return ActivitySF.getInstance().listActivitiesByProject(project);
	}

}
